﻿Public Module General
    Public CurPic As Uri
    Public StardustDir As String = My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData

    Public Images As New List(Of Stardust.Core.ImageObject)

    Public CurScript As CintieFramework.Script
    Public Scripts As New List(Of String)
    Public RenderPriority As System.Windows.Threading.DispatcherPriority =
        Windows.Threading.DispatcherPriority.Background

    Public FullScreen1 As New FullScreen

    Public Const TemplateFileName As String = "Core\Controls\Templates\{0}.xaml"

    Public Function GetTemplateFileName(ByVal ObjectName As String) As String
        Dim FN As New IO.FileInfo(String.Format(TemplateFileName, ObjectName))
        If FN.Exists Then
            Return FN.FullName
        Else
            Throw New Exception(String.Format("Can't find template at: {0}", FN.FullName))
            Return ""
        End If
    End Function
End Module
